Skip to content

Fix Sinopac OTC stock contract resolution#15

Open
koreal6803 wants to merge 1 commit into
mainfrom
fix-sinopac-otc-contracts
Open

Fix Sinopac OTC stock contract resolution#15
koreal6803 wants to merge 1 commit into
mainfrom
fix-sinopac-otc-contracts

Conversation

@koreal6803
Copy link
Copy Markdown
Collaborator

Summary

  • resolve Sinopac stock exchange by probing both TSE and OTC snapshot contracts
  • use resolved contracts in get_stocks and create_order
  • add unit coverage for OTC snapshots and order placement contracts

Context

Discord user 益 (@chungi_923) reported that pm.sync(account, market_order=True, at='close') on finlab 2.0.6 + shioaji 1.3.2 skipped all OTC-heavy orders with not in stocks... skipped!. The current implementation built TSE-only contracts in get_stocks, and create_order also used a TSE-only contract.

Tests

  • PYTHONPATH=/tmp/finlab-online-testroot /Users/cheng-yuhan/miniconda3/envs/finlab/bin/python -m pytest /tmp/finlab-online-testroot/finlab/online/tests/unit -q

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant